<layout name="page" />
<block name="content">
{:widget('page_header/simple',array('name'=>'新建项目'))}
<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   >
	<input type="hidden" id="ajax" name="ajax" value="0">
	<input type="hidden" id="folder" name="folder" value="{$folder}">
	<input type="hidden" id="fid" name="fid" value="{$folder}">
	<input type="hidden" id="opmode" name="opmode" value="add">
	
		<label class="input-label" for="name">项目名称</label>
		
			<input class="input" type="text" id="name" name="name"check="required" info="请输入项目名称">
		</div>
	</div>
		
			<label class="input-label" for="level">项目级别：</label>
			
				<select id="level" name="level" class="input" check="required" info="请选择项目级别">
					<option value="" >请选择</option>
						{:fill_option(get_system_config("xmk_level"))}
				</select>
			</div>
		</div>
		
			<label class="input-label" for="status">项目状态：</label>
			
				<select id="status" name="status" class="input" check="required" info="请选择项目状态">
					<option value="" >请选择</option>
						{:fill_option(get_system_config("xmk_status"))}
				</select>
			</div>
		</div>
	
		<label class="input-label" for="start_date">开始日期：</label>
		
			<input class="input input-date" type="text" id="start_date" name="start_date"check="required" info="请输入开始日期" readonly="readonly" >
		</div>
	</div>
	
		<label class="input-label" for="end_date" >结束日期：</label>
		
			<input class="input input-date" type="text" id="end_date" name="end_date"    check="required" info="请输入结束日期" readonly="readonly">
		</div>
	</div>
	
		
			<textarea  class="editor" id="content" name="content" style="width:100%;height:300px;" check="required" info="请输入项目内容"></textarea>
		</div>
	</div>
	
		<label class="input-label" for="name">附件：</label>
		
			{:widget('file_upload/add')}
		</div>
	</div>
	<div class="action">
		<a class="btn btn-normal" onclick="save()">保存</a>
		<a class="btn btn-return" onclick="go_return_url()">取消 </a>
	</div>
</form></block>
<block name="js">
<script>
	layui.use('global', function() {
		var $ = layui.jquery;
		
		$("#btn_save").on('click',function(){
				var vars=$("#form_data").serialize();
				send_ajax("{:url('save')}", vars, function(ret) {
					if (ret.status) {
						layer.msg(ret.info, function() {
							location.reload(true);
						});
					}else{
						layer.msg(ret.info);
						return false;
					}
				});
			});
		});
</script>

</block>